package com.itheim.lambda2;

public class Test {
    public static void main(String[] args) {
        useFu(new Fu() {
            @Override
            public void sing() {
                System.out.println("sing");
            }
        });
   // useFu(()->{});
        useInter(new Inter() {
            @Override
            public void sing() {

            }

            @Override
            public void dance() {

            }
        });
       useInter(()->{});
    }


    public static void  useFu(Fu fu){
        fu.sing();
    }
    public static void useInter(Inter inter){
        System.out.println(inter);
    }
}
interface Inter{
    void sing();
  default void  dance(){};
}

abstract class Fu{
    public abstract void sing();
}
